var ajax = require('../../utils/ajax.js');
var util = require('../../utils/util.js');
var app = getApp();

Page({
    data: {
        dataLoaded: false,
        configData: {}
    },

    onLoad() {

    },
    onShow() {
        this._getShopConfig();
    },
    _getShopConfig: function() {
        var _self = this;
        var url = "/openapi/Shop/shopSetPage";
        var paramsData = {
            shopSid: app.getShopSid()
        }
        ajax.P(url, paramsData, function(data) {
            _self.setData({
                configData: data.result,
                dataLoaded: true
            })
        })
    },
    _jump(evt) {
        var url = evt.currentTarget.dataset.url;
        if (!url) {
            util.alert('该项不可修改,或可在PC端修改。')
        } else {
            wx.navigateTo({
                url
            })
        }
    }
});